import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import { VueAxios } from './utils/request'

import bootstrap from './core/bootstrap'
import './core/lazy_use'
import './core/use'
import './permission'
import './utils/filter'
import './components/global.less'
import 'element-ui/lib/theme-chalk/index.css';

Vue.config.productionTip = false

const errorHandler = (err, vm, info)=>{
    console.log(`Error: ${err.toString()}\nInfo: ${info}`)
    if (err.isAxiosError) {
    console.log('axios请求错误！！')
    }
}
  
Vue.config.errorHandler = errorHandler;
Vue.prototype.$throw = (error)=> errorHandler(error,this);

Vue.use(VueAxios)
new Vue({
  router,
  store,
  created: bootstrap,
  render: h => h(App)
}).$mount('#app')
